<?php

function posSql($key){
	$features = array(
	
	##############################################
	#	* 고객 정보 테이블 : uatp_customer
	##############################################
	
	# uatp_customer_view
	"customer_info_view"			=> 	
	"select * from uatp_customer where 1 %s order by Idx %s ;",
	
	# uatp_customer_view_page
	"customer_info_view_page"			=> 	
	"select * from uatp_customer where 1 %s order by Idx desc LIMIT %d, %d;",
	
	# uatp_customer_import
	"customer_info_import"			=>
	"select * from uatp_customer where Idx = '%d';",
	

	# uatp_customer_insert_modify
	"customer_info_insert_modify"	=> 	
	"insert into uatp_customer (
			Idx, usercode, name, namekana, zip, 
			addr1, addr2, addr3, addr4, tel, 
			phone, fax, email, job, mw, 
			age, birth, writeday, mailingck ) 
		values (
			%d, '%s', '%s', '%s', '%s', 
			'%s', '%s', '%s', '%s', '%s', 
			'%s', '%s', '%s', '%s', '%s', 
			'%d', '%s', '%s', %d)
		on duplicate key update 
			namekana = '%s',	zip = '%s',	addr1 = '%s',	addr2 = '%s',	addr3 = '%s',
			addr4 = '%s',	tel = '%s',	phone = '%s',	fax = '%s',		email = '%s', 
			job = '%s',		age = %d, mailingck = '%s';",

	
	# uatp_customer_delete
	"customer_info_delete"			=>
	"delete from uatp_customer where Idx = %d;",
	
	
	##############################################
	#	* 바코드 인쇄 설정 테이블 : uatp_prtbar
	##############################################
	
	# uatp_prtbar_view
	"prtbar_info_view"			=>
	"select * from uatp_prtbar where 1 %s order by Idx %s ;",
	
	# uatp_prtbar_view_page
	"prtbar_info_view_page"			=> 	
	"select * from uatp_prtbar where 1 %s order by Idx desc LIMIT %d, %d;"
	
	);

	return $features[$key];
}
?>
